1 Imports System.Data.SqlClient
2 Imports System.IO
3 Imports Excel = Microsoft.Office.Interop.Excel
4 Imports Microsoft.SqlServer.Management.Smo
5 Imports System.Globalization
6
7 Public Class frmMainMenu
8     Dim Filename As String
9
10
11     Private Sub AboutToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles AboutToolStripMenuItem.Click
12         frmAbout.ShowDialog()
13     End Sub
14     Sub Backup()
15         Try
16             Dim dt As DateTime = Today
17             Dim destdir As String =
"SIS_DB " & System.DateTime.Now.ToString("dd-MM-yyyy_h-mm-ss") & ".bak"
18             Dim objdlg As New SaveFileDialog
19             objdlg.FileName = destdir
20             objdlg.ShowDialog()
21             Filename = objdlg.FileName
22             Cursor = Cursors.WaitCursor
23             Timer2.Enabled = True
24             con = New SqlConnection(cs)
25             con.Open()
26             Dim cb As String =
"backup database SIS_DB to disk='" & Filename & "'with init,stats=10"
27             cmd = New SqlCommand(cb)
28             cmd.Connection = con
29             cmd.ExecuteReader()
30             con.Close()
31
32         Catch ex As Exception
33             MessageBox.Show(ex.Message,
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
34         End Try
35     End Sub
36     Private Sub BackupToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles BackupToolStripMenuItem.Click
37         Backup()
38     End Sub
39
40     Private Sub Timer2_Tick(sender As System.Object, e As System.EventArgs) Handles Timer2.Tick
41         Cursor = Cursors.Default
42         Timer2.Enabled = False
43     End Sub
44
45     Private Sub RestoreToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles RestoreToolStripMenuItem.Click
46         Try
47             With OpenFileDialog1
48                 .Filter = (
"DB Backup File|*.bak;")
49                 .FilterIndex =
4
50             End With
51             
'Clear the file name
52             OpenFileDialog1.FileName =
""
53
54             If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
55                 Cursor = Cursors.WaitCursor
56                 Timer2.Enabled = True
57                 SqlConnection.ClearAllPools()
58                 con = New SqlConnection(cs)
59                 con.Open()
60                 Dim cb As String =
"USE Master ALTER DATABASE SIS_DB SET Single_User WITH Rollback Immediate Restore database SIS_DB FROM disk='" & OpenFileDialog1.FileName & "' WITH REPLACE ALTER DATABASE SIS_DB SET Multi_User "
61                 cmd = New SqlCommand(cb)
62                 cmd.Connection = con
63                 cmd.ExecuteReader()
64                 con.Close()
65                 Dim st As String =
"Sucessfully performed the restore"
66                 LogFunc(lblUser.Text, st)
67                 MessageBox.Show(
"Successfully performed", "Database Restore", MessageBoxButtons.OK, MessageBoxIcon.Information)
68             End If
69         Catch ex As Exception
70             MessageBox.Show(ex.Message,
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
71         End Try
72     End Sub
73
74     Private Sub RegistrationToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles RegistrationToolStripMenuItem.Click
75         frmRegistration.lblUser.Text = lblUser.Text
76         frmRegistration.Reset()
77         frmRegistration.ShowDialog()
78     End Sub
79
80     Private Sub LogsToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles LogsToolStripMenuItem.Click
81         frmLogs.Reset()
82         frmLogs.lblUser.Text = lblUser.Text
83         frmLogs.ShowDialog()
84     End Sub
85
86     Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
87         Dim dt As DateTime = Today
88         lblDateTime.Text = dt.ToString(
"dd/MM/yyyy")
89         lblTime.Text = TimeOfDay.ToString(
"h:mm:ss tt")
90     End Sub
91
92     Private Sub CalculatorToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles CalculatorToolStripMenuItem.Click
93         Try
94             System.Diagnostics.Process.Start(
"Calc.exe")
95         Catch ex As Exception
96             MessageBox.Show(ex.Message,
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
97         End Try
98     End Sub
99
100     Private Sub NotepadToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles NotepadToolStripMenuItem.Click
101         Try
102             System.Diagnostics.Process.Start(
"Notepad.exe")
103         Catch ex As Exception
104             MessageBox.Show(ex.Message,
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
105         End Try
106     End Sub
107
108     Private Sub WordpadToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles WordpadToolStripMenuItem.Click
109         Try
110             System.Diagnostics.Process.Start(
"wordpad.exe")
111         Catch ex As Exception
112             MessageBox.Show(ex.Message,
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
113         End Try
114     End Sub
115
116     Private Sub MSWordToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles MSWordToolStripMenuItem.Click
117         Try
118             System.Diagnostics.Process.Start(
"winword.exe")
119         Catch ex As Exception
120             MessageBox.Show(ex.Message,
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
121         End Try
122     End Sub
123
124     Private Sub TaskManagerToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles TaskManagerToolStripMenuItem.Click
125         Try
126             System.Diagnostics.Process.Start(
"TaskMgr.exe")
127         Catch ex As Exception
128             MessageBox.Show(ex.Message,
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
129         End Try
130     End Sub
131
132     Private Sub SystemInfoToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles SystemInfoToolStripMenuItem.Click
133         frmSystemInfo.ShowDialog()
134     End Sub
135     Sub LogOut()
136         frmStock.Hide()
137         frmProduct.Hide()
138         Dim st As String =
"Successfully logged out"
139         LogFunc(lblUser.Text, st)
140         Me.Hide()
141         frmLogin.Show()
142         frmLogin.UserID.Text =
""
143         frmLogin.Password.Text =
""
144         frmLogin.UserID.Focus()
145     End Sub
146     Private Sub LogoutToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles LogoutToolStripMenuItem.Click
147         Try
148             If MessageBox.Show(
"Do you really want to logout from application?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
149                 If MessageBox.Show(
"Do you want backup database before logout?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
150                     Backup()
151                     LogOut()
152                 Else
153                     LogOut()
154                 End If
155             End If
156         Catch ex As Exception
157             MessageBox.Show(ex.Message,
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
158         End Try
159     End Sub
160
161     Private Sub frmMainMenu_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
162         e.Cancel = True
163     End Sub
164
165     Private Sub CompanyInfoToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles CompanyInfoToolStripMenuItem.Click
166         frmCompany.lblUser.Text = lblUser.Text
167         frmCompany.Reset()
168         frmCompany.ShowDialog()
169     End Sub
170
171     Private Sub CustomerToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles CustomerToolStripMenuItem.Click
172         frmCustomer.lblUser.Text = lblUser.Text
173         frmCustomer.Reset()
174         frmCustomer.ShowDialog()
175     End Sub
176
177     Private Sub CategoryToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles CategoryToolStripMenuItem.Click
178         frmCategory.lblUser.Text = lblUser.Text
179         frmCategory.Reset()
180         frmCategory.ShowDialog()
181     End Sub
182
183     Private Sub SubCategoryToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles SubCategoryToolStripMenuItem.Click
184         frmSubCategory.lblUser.Text = lblUser.Text
185         frmSubCategory.Reset()
186         frmSubCategory.ShowDialog()
187     End Sub
188
189     Private Sub SupplierToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles SupplierToolStripMenuItem.Click
190         frmSupplier.lblUser.Text = lblUser.Text
191         frmSupplier.Reset()
192         frmSupplier.ShowDialog()
193     End Sub
194
195     Private Sub CustomerToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles CustomerToolStripMenuItem1.Click
196         frmCustomerRecord1.Reset()
197         frmCustomerRecord1.ShowDialog()
198     End Sub
199
200     Private Sub SupplierToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles SupplierToolStripMenuItem1.Click
201         frmSupplierRecord.Reset()
202         frmSupplierRecord.ShowDialog()
203     End Sub
204
205
206     Private Sub StockToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles StockToolStripMenuItem.Click
207         frmStock.lblUser.Text = lblUser.Text
208         frmStock.lblUserType.Text = lblUserType.Text
209         frmStock.Reset()
210         frmStock.ShowDialog()
211     End Sub
212
213     Public Sub Getdata()
214         Try
215             con = New SqlConnection(cs)
216             con.Open()
217             cmd = New SqlCommand(
"SELECT RTRIM(Product.ProductCode),RTRIM(ProductName),CostPrice,SellingPrice,Discount,VAT,Qty from Temp_Stock,Product where Product.PID=Temp_Stock.ProductID and Qty > 0 order by ProductName", con)
218             rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
219             DataGridView1.Rows.Clear()
220             While (rdr.Read() = True)
221                 DataGridView1.Rows.Add(rdr(
0), rdr(1), rdr(2), rdr(3), rdr(4), rdr(5), rdr(6))
222             End While
223             For Each r As DataGridViewRow In Me.DataGridView1.Rows
224                 con = New SqlConnection(cs)
225                 con.Open()
226                 Dim ct As String =
"select ReorderPoint from Product where ProductCode=@d1"
227                 cmd = New SqlCommand(ct)
228                 cmd.Connection = con
229                 cmd.Parameters.AddWithValue(
"@d1", r.Cells(0).Value.ToString())
230                 rdr = cmd.ExecuteReader()
231                 If (rdr.Read()) Then
232                     Dim i As Integer
233                     i = rdr(
0)
234                     If r.Cells(
6).Value < i Then
235                         r.DefaultCellStyle.BackColor = Color.Red
236                     End If
237                 End If
238             Next
239             con.Close()
240             DataGridView1.ClearSelection()
241
242         Catch ex As Exception
243             MessageBox.Show(ex.Message,
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
244         End Try
245     End Sub
246     Sub Reset()
247         txtProductName.Text =
""
248         Getdata()
249     End Sub
250     Private Function HandleRegistry() As Boolean
251         Dim firstRunDate As Date
252         Dim st As Date = My.Computer.Registry.GetValue(
"HKEY_LOCAL_MACHINE\SOFTWARE\InventorySoft2", "Set", Nothing)
253         firstRunDate = st
254         If firstRunDate = Nothing Then
255             firstRunDate = System.DateTime.Today.Date
256             My.Computer.Registry.SetValue(
"HKEY_LOCAL_MACHINE\SOFTWARE\InventorySoft2", "Set", firstRunDate)
257         ElseIf (Now - firstRunDate).Days >
7 Then
258             Return False
259         End If
260         Return True
261     End Function
262     Private Sub frmMainMenu_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
263         Dim result As Boolean = HandleRegistry()
264
265         If result = False Then
'something went wrong
266             MessageBox.Show(
"Trial expired" & vbCrLf & "for purchasing the full version of software call us at +919827858191", "", MessageBoxButtons.OK, MessageBoxIcon.Information)
267             End
268         End If
269         If lblUserType.Text =
"Admin" Then
270             MasterEntryToolStripMenuItem.Enabled = True
271             RegistrationToolStripMenuItem.Enabled = True
272             LogsToolStripMenuItem.Enabled = True
273             DatabaseToolStripMenuItem.Enabled = True
274             CustomerToolStripMenuItem.Enabled = True
275             SupplierToolStripMenuItem.Enabled = True
276             ProductToolStripMenuItem.Enabled = True
277             StockToolStripMenuItem.Enabled = True
278             ServiceToolStripMenuItem.Enabled = True
279             StockInToolStripMenuItem.Enabled = True
280             BillingToolStripMenuItem.Enabled = True
281             QuotationToolStripMenuItem.Enabled = True
282             RecordToolStripMenuItem.Enabled = True
283             ReportsToolStripMenuItem.Enabled = True
284             VoucherToolStripMenuItem.Enabled = True
285         End If
286         If lblUserType.Text =
"Sales Person" Then
287             MasterEntryToolStripMenuItem.Enabled = False
288             RegistrationToolStripMenuItem.Enabled = False
289             LogsToolStripMenuItem.Enabled = False
290             DatabaseToolStripMenuItem.Enabled = False
291             CustomerToolStripMenuItem.Enabled = True
292             SupplierToolStripMenuItem.Enabled = False
293             ProductToolStripMenuItem.Enabled = False
294             StockToolStripMenuItem.Enabled = False
295             ServiceToolStripMenuItem.Enabled = True
296             StockInToolStripMenuItem.Enabled = True
297             BillingToolStripMenuItem.Enabled = True
298             QuotationToolStripMenuItem.Enabled = True
299             RecordToolStripMenuItem.Enabled = False
300             ReportsToolStripMenuItem.Enabled = False
301             VoucherToolStripMenuItem.Enabled = False
302         End If
303         If lblUserType.Text =
"Inventory Manager" Then
304             MasterEntryToolStripMenuItem.Enabled = False
305             RegistrationToolStripMenuItem.Enabled = False
306             LogsToolStripMenuItem.Enabled = False
307             DatabaseToolStripMenuItem.Enabled = False
308             CustomerToolStripMenuItem.Enabled = False
309             SupplierToolStripMenuItem.Enabled = False
310             ProductToolStripMenuItem.Enabled = True
311             StockToolStripMenuItem.Enabled = True
312             ServiceToolStripMenuItem.Enabled = False
313             StockInToolStripMenuItem.Enabled = True
314             BillingToolStripMenuItem.Enabled = False
315             QuotationToolStripMenuItem.Enabled = False
316             RecordToolStripMenuItem.Enabled = False
317             ReportsToolStripMenuItem.Enabled = False
318             VoucherToolStripMenuItem.Enabled = False
319         End If
320         Getdata()
321         DataGridView1.ClearSelection()
322         DataGridView1.Columns(
2).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
323         DataGridView1.Columns(
3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
324         DataGridView1.Columns(
4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
325         DataGridView1.Columns(
5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
326         DataGridView1.Columns(
6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
327
328     End Sub
329
330     Private Sub StockToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles StockToolStripMenuItem1.Click
331         frmStockRecord1.Reset()
332         frmStockRecord1.ShowDialog()
333     End Sub
334
335     Private Sub StockInToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles StockInToolStripMenuItem.Click
336         frmCurrentStock.Reset()
337         frmCurrentStock.ShowDialog()
338     End Sub
339
340     Private Sub btnExportExcel_Click(sender As System.Object, e As System.EventArgs) Handles btnExportExcel.Click
341         Dim rowsTotal, colsTotal As Short
342         Dim I, j, iC As Short
343         System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor
344         Dim xlApp As New Excel.Application
345         Try
346             Dim excelBook As Excel.Workbook = xlApp.Workbooks.Add
347             Dim excelWorksheet As Excel.Worksheet = CType(excelBook.Worksheets(
1), Excel.Worksheet)
348             xlApp.Visible = True
349
350             rowsTotal = DataGridView1.RowCount
351             colsTotal = DataGridView1.Columns.Count -
1
352             With excelWorksheet
353                 .Cells.Select()
354                 .Cells.Delete()
355                 For iC =
0 To colsTotal
356                     .Cells(
1, iC + 1).Value = DataGridView1.Columns(iC).HeaderText
357                 Next
358                 For I =
0 To rowsTotal - 1
359                     For j =
0 To colsTotal
360                         .Cells(I +
2, j + 1).value = DataGridView1.Rows(I).Cells(j).Value
361                     Next j
362                 Next I
363                 .Rows(
"1:1").Font.FontStyle = "Bold"
364                 .Rows(
"1:1").Font.Size = 12
365
366                 .Cells.Columns.AutoFit()
367                 .Cells.Select()
368                 .Cells.EntireColumn.AutoFit()
369                 .Cells(
1, 1).Select()
370             End With
371         Catch ex As Exception
372             MessageBox.Show(ex.Message,
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
373         Finally
374             
'RELEASE ALLOACTED RESOURCES
375             System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
376             xlApp = Nothing
377         End Try
378     End Sub
379
380     Private Sub txtProductName_TextChanged(sender As System.Object, e As System.EventArgs) Handles txtProductName.TextChanged
381         Try
382             con = New SqlConnection(cs)
383             con.Open()
384             cmd = New SqlCommand(
"SELECT RTRIM(Product.ProductCode),RTRIM(ProductName),CostPrice,SellingPrice,Discount,VAT,Qty from Temp_Stock,Product where Product.PID=Temp_Stock.ProductID and qty > 0 and ProductName like '%" & txtProductName.Text & "%' order by ProductName", con)
385             rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
386             DataGridView1.Rows.Clear()
387             While (rdr.Read() = True)
388                 DataGridView1.Rows.Add(rdr(
0), rdr(1), rdr(2), rdr(3), rdr(4), rdr(5), rdr(6))
389             End While
390             For Each r As DataGridViewRow In Me.DataGridView1.Rows
391                 con = New SqlConnection(cs)
392                 con.Open()
393                 Dim ct As String =
"select ReorderPoint from Product where ProductCode=@d1"
394                 cmd = New SqlCommand(ct)
395                 cmd.Connection = con
396                 cmd.Parameters.AddWithValue(
"@d1", r.Cells(0).Value.ToString())
397                 rdr = cmd.ExecuteReader()
398                 If (rdr.Read()) Then
399                     Dim i As Integer
400                     i = rdr(
0)
401                     If r.Cells(
6).Value < i Then
402                         r.DefaultCellStyle.BackColor = Color.Red
403                     End If
404                 End If
405             Next
406             con.Close()
407             DataGridView1.ClearSelection()
408         Catch ex As Exception
409             MessageBox.Show(ex.Message,
"Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
410         End Try
411     End Sub
412
413     Private Sub btnReset_Click(sender As System.Object, e As System.EventArgs) Handles btnReset.Click
414         Reset()
415     End Sub
416
417     Private Sub ContactsToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ContactsToolStripMenuItem.Click
418         frmContacts.lblUser.Text = lblUser.Text
419         frmContacts.Reset()
420         frmContacts.ShowDialog()
421     End Sub
422
423     Private Sub IndividualToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs)
424         frmProductRecord.Reset()
425         frmProductRecord.ShowDialog()
426     End Sub
427
428     Private Sub ProductToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ProductToolStripMenuItem.Click
429         frmProduct.lblUser.Text = lblUser.Text
430         frmProduct.lblUserType.Text = lblUserType.Text
431         frmProduct.Reset()
432         frmProduct.ShowDialog()
433     End Sub
434
435     Private Sub ProductToolStripMenuItem2_Click(sender As System.Object, e As System.EventArgs) Handles ProductToolStripMenuItem2.Click
436         frmProductRecord.Reset()
437         frmProductRecord.ShowDialog()
438     End Sub
439
440     Private Sub ServiceToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ServiceToolStripMenuItem.Click
441         frmServices.lblUser.Text = lblUser.Text
442         frmServices.lblUserType.Text = lblUserType.Text
443         frmServices.Reset()
444         frmServices.ShowDialog()
445     End Sub
446
447     Private Sub ServiceToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles ServiceToolStripMenuItem1.Click
448         frmServicesRecord.Reset()
449         frmServicesRecord.ShowDialog()
450     End Sub
451
452     Private Sub QuotationToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles QuotationToolStripMenuItem.Click
453         frmQuotation.lblUser.Text = lblUser.Text
454         frmQuotation.lblUserType.Text = lblUserType.Text
455         frmQuotation.Reset()
456         frmQuotation.ShowDialog()
457     End Sub
458
459     Private Sub QuotationToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles QuotationToolStripMenuItem1.Click
460         frmQuotationRecord1.Reset()
461         frmQuotationRecord1.ShowDialog()
462     End Sub
463
464     Private Sub ProductsToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ProductsToolStripMenuItem.Click
465         frmBilling.lblUser.Text = lblUser.Text
466         frmBilling.lblUserType.Text = lblUserType.Text
467         frmBilling.Reset()
468         frmBilling.ShowDialog()
469     End Sub
470
471     Private Sub ProductsRepairToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ProductsRepairToolStripMenuItem.Click
472         frmBilling1.lblUser.Text = lblUser.Text
473         frmBilling1.lblUserType.Text = lblUserType.Text
474         frmBilling1.Reset()
475         frmBilling1.ShowDialog()
476     End Sub
477
478     Private Sub BillingProductsServiceToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles BillingProductsServiceToolStripMenuItem.Click
479         frmBillingRecord1.Reset()
480         frmBillingRecord1.ShowDialog()
481     End Sub
482
483     Private Sub SMSSettingToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles SMSSettingToolStripMenuItem.Click
484         frmSMSSetting.Reset()
485         frmSMSSetting.ShowDialog()
486     End Sub
487
488     Private Sub SalesToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles SalesToolStripMenuItem.Click
489         frmSalesReport.Reset()
490         frmSalesReport.ShowDialog()
491     End Sub
492
493     Private Sub ServiceBillingToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ServiceBillingToolStripMenuItem.Click
494         frmServiceDoneReport.Reset()
495         frmServiceDoneReport.ShowDialog()
496     End Sub
497
498     Private Sub StockInAndStockOutToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles StockInAndStockOutToolStripMenuItem.Click
499         frmStockInAndOutReport.ShowDialog()
500     End Sub
501
502     Private Sub PurchaseToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles PurchaseToolStripMenuItem.Click
503         frmPurchaseReport.Reset()
504         frmPurchaseReport.ShowDialog()
505     End Sub
506
507     Private Sub ProfitAndLossToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ProfitAndLossToolStripMenuItem.Click
508         frmProfitAndLossReport.Reset()
509         frmProfitAndLossReport.ShowDialog()
510     End Sub
511
512     Private Sub VoucherToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles VoucherToolStripMenuItem.Click
513         frmVoucher.Reset()
514         frmVoucher.lblUser.Text = lblUser.Text
515         frmVoucher.ShowDialog()
516     End Sub
517
518     Private Sub ExpenditureToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ExpenditureToolStripMenuItem.Click
519         frmVoucherReport.Reset()
520         frmVoucherReport.ShowDialog()
521     End Sub
522
523     Private Sub CreditorsAndDebtorsToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles CreditorsAndDebtorsToolStripMenuItem.Click
524         frmCreditorsAndDebtorsReport.ShowDialog()
525     End Sub
526
527     Private Sub OverallToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles OverallToolStripMenuItem.Click
528         frmOverallReport.Reset()
529         frmOverallReport.ShowDialog()
530     End Sub
531 End Class


Gõ tìm kiếm nhanh...